#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include<string.h>
int main()
{
    char n[1000] = { 0 };
    char str[1000] = { 0 };
    int k = 0;
    scanf("%s %d", n, &k);
    printf("%s", strncpy(str, n, k));
    return 0;
}